package com.sg.dto.biz.framework.common;


import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;


@Data
public class FrameworkPrivacyDto extends BaseDto implements Serializable {

    /**
     * 权限ID:
     */
    @NotNull(message = "权限ID不能为空")
    @ApiModelProperty("权限ID")
    private String privacyId;

    /**
     * 权限标识:
     */
    @NotNull(message = "权限标识不能为空")
    @ApiModelProperty("权限标识")
    private String privacyCode;

    /**
     * 权限名称:
     */
    @NotNull(message = "权限名称不能为空")
    @ApiModelProperty("权限名称")
    private String privacyName;

    /**
     * 分配策略:
     */
    @ApiModelProperty("分配策略")
    private String strategyType;
    /**
     * 操作时间:
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;
    /**
     * 权限图标:
     */
    @ApiModelProperty("权限图标")
    private String privacyLogo;
    /**
     * 主体生命周期:
     */
    @ApiModelProperty("主体生命周期")
    private String subjectLifeCycle;
    /**
     * 操作人就职记录ID:
     */
    @ApiModelProperty("操作人就职记录ID")
    private String operationInductionId;
    /**
     * 分配对象ID:
     */
    @ApiModelProperty("分配对象ID")
    private String allocationObjectId;
    /**
     * 是否接口权限:
     */
    @NotNull(message = "是否接口权限不能为空")
    @ApiModelProperty("是否接口权限")
    private String isportPrivacy;
    /**
     * 权限路由:
     */
    @ApiModelProperty("权限路由")
    private String privacyRoute;
    /**
     * 是否数据权限:
     */
    @NotNull(message = "是否数据权限不能为空")
    @ApiModelProperty("是否数据权限")
    private String isDataPrivacy;
    /**
     * 数据父模型编码:
     */
    @ApiModelProperty("数据父模型编码")
    private String dataModel;
    /**
     * 权限类别:
     */
    @ApiModelProperty("权限类别")
    private String privacyCategory;
    /**
     * 权限业务用途:
     */
    @ApiModelProperty("权限业务用途")
    private String businessPurposes;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        FrameworkPrivacyDto that = (FrameworkPrivacyDto) o;
        return privacyId == that.privacyId && privacyCode == that.privacyCode && privacyName == that.privacyName && strategyType == that.strategyType && operateTime == that.operateTime && privacyLogo == that.privacyLogo && subjectLifeCycle == that.subjectLifeCycle && operationInductionId == that.operationInductionId && allocationObjectId == that.allocationObjectId && isportPrivacy == that.isportPrivacy && privacyRoute == that.privacyRoute && isDataPrivacy == that.isDataPrivacy && dataModel == that.dataModel && privacyCategory == that.privacyCategory && businessPurposes == that.businessPurposes;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), privacyId, privacyCode, privacyName, strategyType, operateTime, privacyLogo, subjectLifeCycle, operationInductionId, allocationObjectId, isportPrivacy, privacyRoute, isDataPrivacy, dataModel, privacyCategory, businessPurposes);
    }
}
